home *** CD-ROM | disk | FTP | other *** search
- on enterFrame
- global gAmberPath, gSavePath, gProjectorPath, fastLocationData, gCPU, gCDtry, testData, gMaxCDtries
- set gMaxCDtries to 4
- if voidp(gCDtry) then
- set gCDtry to 1
- end if
- put "gCDtry = " & gCDtry
- if gCPU = #PC then
- openXLib("LABELDRV.DLL")
- set ld to labelDrv(mnew)
- put ld(mSetRange, "A", "Z")
- if gCDtry <= gMaxCDtries then
- set cdLetter to ld(mGetDrive, "AMBER_DISC1")
- put "cdLetter = "
- put cdLetter
- if charToNum(char 1 of cdLetter) <> 0 then
- set gAmberPath to char 1 to 2 of cdLetter & "\"
- put "gAmberPath = "
- put gAmberPath
- else
- put "bad string"
- if gCDtry < gMaxCDtries then
- alert("Please insert the " & QUOTE & "AMBER_DISC1" & QUOTE & " CD into any drive")
- else
- alert("Sorry, the CD doesn't seem to be mounted")
- end if
- end if
- end if
- if gCDtry = gMaxCDtries then
- put "gAmberPath =" & gAmberPath
- if voidp(gAmberPath) then
- put "final volumeTest = "
- put cdLetter
- put "OK, now I'd really quit.."
- clearGlobals()
- quit()
- end if
- end if
- put ld(mdispose)
- closeXLib("LABELDRV.DLL")
- else
- openXLib("AMBER resources")
- if 1 then
- set gAmberPath to the pathName
- else
- if gCDtry <= gMaxCDtries then
- set volumeTest to FileIO(mnew, "read", "AMBER-Journeys Beyond‚Ñ¢ (B):Read Me")
- if objectp(volumeTest) then
- volumeTest(mdispose)
- set gAmberPath to "AMBER-Journeys Beyond‚Ñ¢ (B):"
- else
- if integerp(volumeTest) then
- put "[!] fileIO error -> " & FileIO(mError, volumeTest)
- if getPos([-35, -120, -43], volumeTest) <> 0 then
- if gCDtry < gMaxCDtries then
- set tempCDobject to AppleCD(mnew)
- tempCDobject(mEject)
- alert("Please insert the " & QUOTE & "AMBER-Journeys Beyond‚Ñ¢ Disc B" & QUOTE & " CD into any drive")
- else
- alert("Sorry, there is an error in trying to find the CD:" & RETURN & RETURN & " '" & FileIO(mError, volumeTest) & "'")
- end if
- else
- alert("Sorry, there is an error in trying to find the CD:" & RETURN & RETURN & " '" & FileIO(mError, volumeTest) & "'")
- end if
- else
- alert("Sorry, there is an unknown error in trying to find the CD")
- end if
- end if
- end if
- if gCDtry = gMaxCDtries then
- put "gAmberPath =" & gAmberPath
- if voidp(gAmberPath) then
- put "final volumeTest = "
- put volumeTest
- clearGlobals()
- quit()
- end if
- end if
- end if
- closeXLib("AMBER resources")
- end if
- set gCDtry to gCDtry + 1
- set gProjectorPath to the pathName
- if stringp(gAmberPath) then
- set oldDelim to the itemDelimiter
- set the itemDelimiter to ":"
- set the itemDelimiter to oldDelim
- end if
- if gCPU = #PC then
- set gSavePath to the pathName & "SAVEDATA\"
- else
- set gSavePath to the pathName & "saved games:"
- end if
- set fastLocationData to 1
- end
-
- on exitFrame
- global gAmberPath, gMaxCDtries, gCDtry, gCPU, gProjectorPath
- if voidp(gAmberPath) then
- if gCDtry <= gMaxCDtries then
- if integerp(gCDtry) then
- go(the frame)
- end if
- return
- else
- exit
- end if
- end if
- append(the searchPath, gAmberPath)
- if gCPU = #PC then
- set tempSoundPath to gProjectorPath & "GAMEDATA\"
- set logoPath to gAmberPath & "ROXY\MOVIES\"
- else
- set tempSoundPath to gProjectorPath & "sounds etc.:"
- set logoPath to gAmberPath & "ROXY:movies:"
- end if
- append(the searchPath, tempSoundPath)
- append(the searchPath, logoPath)
- go(1, "AMBERHUB")
- end
-